package com.xmy.cultivate.mapper;

import com.xmy.cultivate.entity.SchoolIntendant;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

/**
 * <p>
 * 校区主管表 Mapper 接口
 * </p>
 *
 * @author hpiggy
 * @since 2024-10-09
 */
public interface SchoolIntendantMapper extends BaseMapper<SchoolIntendant> {


    @Select("select GROUP_CONCAT(school_id) as school_ids from school_intendant where year_part = ${yearPart} and quarter_num = ${quarterNum} and type = ${type} and teacher_id = ${teacherId} and deleted = 0 ")
    public String getSchoolIdsForTeacherId(@Param("yearPart") Integer yearPart, @Param("quarterNum") Integer quarterNum, @Param("teacherId") Long teacherId, @Param("type") Integer type);
}
